WRITE FILEBLOCK

This command will write a file to a pack file.

  Syntax
WRITE FILEBLOCK File Number, Filename to Create
  Parameters
File Number
Integer
The file number
Filename to Create
String
The new file name string

  Returns

This command does not return a value.

  Description

A pack file is like a normal file you create yourself using the OPEN and CLOSE commands, but has the additional feature that as well as storing numerics and strings, you can also store entire files and directories.

  Example Code
cls
open to write 1,"data.dat"
if file open(1)=1
write fileblock 1,"allmydata.data"
endif
close file 1
wait 1000*8
open to read 1,"data.dat"
if file open(1)=1
read fileblock 1,"allmydata.data"
endif
close file 1
do
loop
end
>
  See also

FILE Commands Menu
Index